#!/bin/sh

# This file runs when a DM logs you into a graphical session.
# If you use startx/xinit like a Chad, this file will also be sourced.

# This file's true location is in ~/.config/xprofile and a link exists to it in
# ~/.xprofile. If you do not use a DM, you may remove the link to it to have a
# cleaner home.

## music player daemon-you might prefer it as a service though
mpd &

## Uncomment to use Xresources colors/settings on startup
xrdb "${XDG_CONFIG_HOME:-$HOME/.config}"/Xresources &

## picom for transparency
picom &

## dunst for notifications
dunst &

## Speed xrate up
xset r rate 300 50 &

# Keyboard navigation tool
keynav &

## Set keyboard map
setxkbmap -layout us,ru,ua -option "grp:caps_toggle,grp_led:scroll,compose:ralt" &

## Lock screen
xautolock -time 10 -locker slock &

## Remove mouse when idle
unclutter -noevents &

## Set background
feh --no-fehbg --bg-tile "$XDG_CONFIG_HOME/wallpaper/dwm.jpg"

## DWM status bar
while true; do
    slstatus
done &

# Update contacts in Nextcloud
while true; do
    vdirsyncer sync
    sleep 600s
done &

# Check mail
while true; do
    mailsync
    sleep 60s
done &

## Clipboard manager
clipmenud &

# Disable touchpad
thinkpad-touchpad

## Start terminal
st -e tmux &
